package calculate;

import java.math.BigDecimal;

/**
 * TODO:类描述
 *
 * @className: Test
 * @packageName: TEst
 * @author: Zhuhj
 * @version: V1.0
 * @date: 2021/4/28 9:42
 */
public class Test {
    public static void main(String[] args) {
//        File file = new File("D:\\WORK\\devupload\\print\\1\\blzk\\");
//        System.out.println(file.exists());
//        file.mkdirs();
//        file.mkdir();
        BigDecimal a  = new BigDecimal("5.0");
        BigDecimal b  = new BigDecimal("4.980");
        BigDecimal c  = new BigDecimal("0.0");
        System.out.println(a.subtract(b).doubleValue());

        System.out.println("a = " + a.stripTrailingZeros().toPlainString());
        System.out.println("b = " + b.stripTrailingZeros().toPlainString());
        System.out.println("c = " + c.stripTrailingZeros().toPlainString());

        // tst222

        // sss
        // bbb
        // bbbsss
    }
}
